package com.yonyou.cms.epc.mapper.file;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yonyou.cms.epc.client.entity.file.FilePO;
import com.yonyou.cyx.framework.dao.base.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhouzijian
 * @since 2020-12-29
 */
public interface FileMapper extends SuperMapper<FilePO> {

    List<Map<String, Object>> deleteFileByDjid(@Param("params") Map<String, Object> queryCondition);

    List<Map<String, Object>> selectFilesByDjid(@Param("params") Map<String, Object> queryCondition);

    default List<FilePO> selectFilesByDjid(String xtfjlx, Long xtdjid) {
        LambdaQueryWrapper<FilePO> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.eq(FilePO::getXtfjlx, xtfjlx);
        queryWrapper.eq(FilePO::getXtdjid, xtdjid);
        List<FilePO> files = selectList(queryWrapper);
        return files;
    }
}
